﻿using System.Windows.Controls;
using System.Windows.Data;
using FluidKit.Controls;
using TVersiPlay.Common.Interfaces;
using TVersiPlay.MainMenu.ViewModels;

namespace TVersiPlay.MainMenu.Views
{
    /// <summary>
    /// Interaction logic for MainMenuView.xaml
    /// </summary>
    public partial class MainMenuView : UserControl, IView
    {
        public MainMenuView(IMainMenuViewModel vm)
        {
            this.DataContext = vm;
            InitializeComponent();            
        }

        private void UserControl_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            Binding b = new Binding("SelectedMenuIndex");
            this._elementFlow.SetBinding(ElementFlow.SelectedIndexProperty, b);
        }


        public bool PersistView
        {
            get { return true; }
        }
    }
}
